package com.terrynoya.fight.combat
{
	public class CharacterVariables
	{
		private var _varInt:Array;
		private var _varFloat:Array;
		private var _sysInt:Array;
		private var _sysFloat:Array;
		
		public function CharacterVariables()
		{
			this._varInt = new Array();
			this._varFloat = new Array();
			this._sysFloat = new Array();
			this._sysInt = new Array();
		}
		
		public function setInteger(index:int,system:Boolean,value:int):void
		{
			var vars:Array = this.getInts(system);
			vars[index] = value;
		}
		
		public function getInteger(index:int,system:Boolean):int
		{
			var vars:Array = this.getInts(system);	
			return vars[index];
		}
		
		private function getInts(system:Boolean):Array
		{
			var vars:Array = system == true ? this._sysInt : this._varInt;
			return vars;
		}
		
		private function getFloats(system:Boolean):Array
		{
			var vars:Array = system == true ? this._sysFloat : this._varFloat;
			return vars;
		}
		
		public function setFloat(index:int,system:Boolean,value:Number):void
		{
			var vars:Array = this.getFloats(system);
			vars[index] = value;
		}
		
		public function getFloat(index:int,system:Boolean):Number
		{
			var vars:Array = this.getFloats(system);	
			return vars[index];
		}
	}
}